Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[iOS] Network invalidate handlers to cleanup in turbo module mode #41775

Conversation

zhongwuzw
Copy link
Contributor

Summary:

We should do some cleanup for handlers in Networking to fix some memory leaks.Ex. RCTHTTPRequestHandler hander, session retains the handler which leads to leaks.

_session = [NSURLSession sessionWithConfiguration:configuration delegate:self delegateQueue:callbackQueue];

Changelog:

[IOS] [FIXED] - Network invalidate handlers to cleanup in turbo module mode

Test Plan:

Network handlers clean up after invalidating.

@facebook-github-bot facebook-github-bot added CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team. labels Dec 4, 2023
@analysis-bot
Copy link

Platform Engine Arch Size (bytes) Diff
android hermes arm64-v8a 17,705,416 -49
android hermes armeabi-v7a n/a --
android hermes x86 n/a --
android hermes x86_64 n/a --
android jsc arm64-v8a 21,092,621 +8
android jsc armeabi-v7a n/a --
android jsc x86 n/a --
android jsc x86_64 n/a --

Base commit: 3854735
Branch: main

@facebook-github-bot
Copy link
Contributor

@dmytrorykun has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@facebook-github-bot facebook-github-bot added the Merged This PR has been merged. label Dec 12, 2023
@facebook-github-bot
Copy link
Contributor

@dmytrorykun merged this pull request in 44d6e43.

Othinn pushed a commit to Othinn/react-native that referenced this pull request Jan 9, 2024
…#41775)

Summary:
We should do some cleanup for handlers in Networking to fix some memory leaks.Ex.  `RCTHTTPRequestHandler` hander, `session` retains the handler which leads to leaks.
https://github.com/facebook/react-native/blob/385473522cbc525aad08500f5a752dea734c14c3/packages/react-native/Libraries/Network/RCTHTTPRequestHandler.mm#L97

## Changelog:

[IOS] [FIXED] - Network invalidate handlers  to cleanup in turbo module mode

Pull Request resolved: facebook#41775

Test Plan: Network handlers clean up after invalidating.

Reviewed By: NickGerleman

Differential Revision: D51846962

Pulled By: dmytrorykun

fbshipit-source-id: 17a2875903cda187f2e3ecea46e8f7f3e10d5264
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Merged This PR has been merged. Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants